package j04zuoye.fly;
/*
包含飞机名name, 容量capacity, 包含一个开门方法openDoor, 关门方法closeDoor,
 */
public class Airplane implements IFly{
    String name;
    int capacity;

    public Airplane(String name, int capacity) {
        this.name = name;
        this.capacity = capacity;
    }

    public void openDoor() {
        System.out.println("开门");
    }
    public void closeDoor() {
        System.out.println("关门");
    }

    @Override
    public void fly() {
        System.out.println(name+"飞起来了！");
    }
}
